using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BUS;
using DTO;
using DAL;
public partial class Default2 : System.Web.UI.Page
{
    public int sogiay = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        //DateTime now = DateTime.Now;
        //DateTime enddate = DateTime.Now.AddMinutes(10000);
        //DateTime enddate = DateTime.Now.Add("1");
        //TimeSpan t = enddate - now;
        tbSanPham sp = tbSanPhamBUS.GetByID(2);

        DateTime end = sp.ngayhethan;
        DateTime now = DateTime.Now;
        TimeSpan t = end - now;
        //sogiay = t.TotalSeconds() ;
        //sogiay = int.Parse(t.TotalSeconds .ToString());

       

        Label1.Text = t.ToString();
        Label2.Text = sogiay.ToString();
        //Label3.Text = enddate.ToString();
        Label4.Text = sogiay.ToString();
    }
}
